package servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class HTMLServlet extends HttpServlet {
	 /**
	 * 
	 */
	
	private static final long serialVersionUID = -1075334647950148368L;

	@Override
	  public void doGet(HttpServletRequest peticion,
	                    HttpServletResponse respuesta)
	      throws ServletException, IOException {
	    respuesta.setContentType("text/html");
	    PrintWriter salida = respuesta.getWriter();
	    salida.println("<html>\n" +
	                "<head><title>Hola Mundo!</title></head>\n" +
	                "<body>\n" +
	                "<h1>Hola Mundo!</h1>\n" +
	                "</body></html>");
	  } 
}
